This invention generally addresses the updating of records stored in a database and more specifically, addresses databases which contain records which must be periodically updated such as by resetting or clearing fields in a record.
A number of applications exist in which a database stores a plurality of records which require periodic updating. For example, a database in a telecommunication system may keep a record for each of its subscribers. The record may include a data field which functions as a counter that keeps a cumulative count of the approximate usage (in time or dollar value) by the subscriber over a time interval such as a billing period. Such records are updated on a periodic basis in order to reset the counter values to zero or to a predetermined default value at the beginning of an interval.
In one known approach for periodically resetting the records, a batch program is executed which searches all records to determine if periodic updating of the record is needed. Such processing consumes substantial computational resources in the searching, determining if an update is required, and the updating of each record at the beginning of every possible time interval. This technique also limits the accuracy of the records in that the updating of the records is limited to the frequency at which the batch program is executed and is incapable of performing the update at the exact time desired for each record.
Other applications also rely on databases which maintain records with cumulative counters to track corresponding events. For example, a tollway system may desire to maintain a running total of the tolls received from motorists. Desirably, the records are updated or reset, in this case to zero, on a periodic basis such as every 24 hours or every week in order to maintain statistics relating to the amount of tolls collected. This information can be utilized in a variety of ways including theft prevention and revenue forecasting.
The above-noted disadvantages associated with record updates by batch programs are exacerbated as the frequency of updates increases and as the number of records in the database increases. For a database, especially one containing a large number of records, these disadvantages give rise to a need for an improved technique for updating such records.